package com.sunday.boot3.user.center.rest.vo.user;

import io.swagger.v3.oas.annotations.media.Schema;
import com.sunday.common.core.gson.GsonUtils;
import com.sunday.common.core.remoting.rest.page.PageVO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @Description: 用户表 请求 VO
 * @author: zsy
 * @Create: 2024/09/23 10:06:39
 */
@Data
@NoArgsConstructor
@Schema(description = "PageUserReqVO 对象")
public class PageUserReqVO extends PageVO {

    public PageUserReqVO(long current, long pageSize) {
        super(current, pageSize);
    }

    @Schema(description = "主键", required = true)
    private Long id;

    @Schema(description = "用户名", required = true)
    private String username;

    @Schema(description = "密码", required = true)
    private String password;

    @Schema(description = "创建日期", required = true)
    private LocalDate createDate;

    @Schema(description = "创建时间", required = true)
    private LocalDateTime createTime;

    public static PageUserReqVO of(long current, long pageSize) {
        return new PageUserReqVO(current, pageSize);
    }

    @Override
    public String toString() {
        return GsonUtils.DEFAULT.toJson(this);
    }

}
